<script setup lang="ts">
import { useUserStore } from '@/store'

const userInfoRef = useUserStore()
</script>

<template>
  <view class="outer">
    <navigator
      :url="userInfoRef?.isLogined ? '/pages/functions/borrow' : '/pages/login/login'"
      open-type="navigate"
      hover-class="navigator-hover"
    >
      <image class="image" src="/static/home/borrow.png" mode="scaleToFill" />
    </navigator>
    <navigator
      :url="userInfoRef?.isLogined ? '/pages/functions/return' : '/pages/login/login'"
      open-type="navigate"
      hover-class="navigator-hover"
    >
      <image class="image" src="/static/home/return.png" mode="scaleToFill" />
    </navigator>
  </view>
</template>

<style lang="scss">
.outer {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  margin: 50rpx 0rpx;
}
.image {
  width: 330rpx;
  height: 330rpx;
  margin: 5rpx;
  border-radius: 50rpx;
}
</style>
